﻿#pragma once

#include <QWidget>
#include "ui_SDLRenderAVFrameWindow.h"
#include "MultipleVideosPlayController.h"
#include <QCloseEvent>
#include <QResizeEvent>

class SDLRenderAVFrameWindow : public QWidget
{
	Q_OBJECT

public:
	SDLRenderAVFrameWindow(QWidget *parent = nullptr);
	~SDLRenderAVFrameWindow();
protected:
	// 重写关闭事件处理函数
	void closeEvent(QCloseEvent* event) override;
	void resizeEvent(QResizeEvent* event) override;

public slots:
	void selectVideo1Func();
	void selectVideo2Func();
	void onSelectPixFormatIndex1(int pos);
	void onSelectPixFormatIndex2(int pos);

private:
	Ui::SDLRenderAVFrameWindow ui;
	MultipleVideosPlayController *playController1 = nullptr;
	MultipleVideosPlayController* playController2 = nullptr;
	IVideoRenderView::PixFormat m_fmt1 = IVideoRenderView::YUV420P;
	IVideoRenderView::PixFormat m_fmt2 = IVideoRenderView::YUV420P;
};
